<template>
  <div class="personal">
    <el-container class="container">
      <el-header>
        <div class="top_personal"><noHomeTop :hasSort="1"/></div>
      </el-header>
      <el-main class="main">
        <div class="mian-header-box">
          <div class="main-header">
            <img :src="bgSrc" />
            <div class="upload-pictures">
              <i class="el-icon-camera-solid"></i>上传封面图片
            </div>
            <div class="ip-box">
              <i class="el-icon-location"></i>
              <div class="text">IP属地未知</div>
            </div>
          </div>
          <div class="main-btm">
            <div class="head-sculpture">
              <img src="@/assets/images/dog.png" alt="" />
            </div>
            <div class="profile">
              <div class="title">LZC-cheng</div>
              <div class="gender">♂</div>
              <div class="file">
                <i class="el-icon-arrow-down"></i> 查看详细资料
              </div>
            </div>
            <div class="edit-box">退出登录</div>
          </div>
        </div>
        <div class="main-btm-box">
          <div class="main-btm-r">
            <div class="tabs">
              <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="回答" name="first">
                  <div class="tabs-item">
                    <h4>我的回答</h4>
                    <div class="content">默认内容</div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="提问" name="second">提问</el-tab-pane>
                <el-tab-pane label="历史问题" name="third"
                  >历史问题</el-tab-pane
                >
                <el-tab-pane label="喜欢" name="fourth">喜欢</el-tab-pane>
              </el-tabs>
            </div>
          </div>
          <div class="main-btm-l">
            <div class="content">
              <div class="header">
                <img src="@/assets/images/indite.png" />
                <div class="txt">创作中心</div>
              </div>
              <div class="center">
                <div class="txt-box">
                  <h5>开启你的知乎创造之旅</h5>
                  <div class="txt-cc">
                    发布首篇内容，开启创作中心，快来成为知乎创造者吧~
                  </div>
                </div>
                <img src="@/assets/images/indite-2.png" />
              </div>
              <div class="btm" @click="gocreateArticle">＋开始创作</div>
            </div>
            <div class="lowest-level">
              <div class="lowest-item">
                <div>回答</div>
                <div>1</div>
              </div>
              <div class="lowest-item">
                <div>喜欢</div>
                <div>1</div>
              </div>
            </div>
          </div>
        </div>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import noHomeTop from '@/components/noHomeTop/noHomeTop.vue';
export default {
  components:{noHomeTop},
  data() {
    return {
      bgSrc:
        "https://img2.baidu.com/it/u=1657975451,2659596366&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=313",
      activeName: "second",
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    gocreateArticle(){
      this.$router.push('/createArticle')
    }
  },
};
</script>
<style scoped>
.btm:hover{
  cursor: pointer;
}
.top_personal {
  padding-top: 10px;
  width: 1000px;
  margin: 0 auto;
}
.el-header {
  background-color: #fff;
}
.personal {
  height: 100%;
  background-color: #f5f5f5;
}
.container {
  width: 100%;
  height: 100%;
  text-align: center;
}
.main {
  width: 80%;
  height: 100%;
  margin: 0 auto;
  margin-bottom: 10px;
  padding: 0;
}
.mian-header-box {
  width: 100%;
  background-color: #fff;
}
.main-header {
  width: 100%;
  height: 140px;
  background-color: cadetblue;
  position: relative;
}
.main-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-pictures {
  width: 120px;
  /* height: 20px; */
  border: 0.1px solid #fff;
  position: absolute;
  right: 10px;
  top: 20px;
  overflow: hidden;
  z-index: 99;
  font-size: 12px;
  color: #fff;
  /* line-height: 20px; */
  padding: 5px 10px;
}
.el-icon-camera-solid {
  margin-right: 4px;
}
.ip-box {
  width: 80px;
  height: 23px;
  background-color: #696969;
  border-radius: 2px;
  position: absolute;
  right: 10px;
  bottom: 10px;
  overflow: hidden;
  z-index: 99;
  font-size: 12px;
  color: #fff;
  line-height: 23px;
  text-align: center;
  padding-right: 8px;
}
.ip-box .text {
  float: right;
  color: #fff;
  right: 8px;
}

.main-btm {
  width: 100%;
  height: 130px;
  position: relative;
}

.head-sculpture {
  width: 140px;
  height: 140px;
  padding: 5px;
  border-radius: 4px;
  position: absolute;
  top: -40px;
  left: 10px;
  background-color: #fff;
}
.head-sculpture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile {
  margin-top: 20px;
  width: 200px;
  position: absolute;
  left: 160px;
}
.profile .title {
  font-size: 24px;
  margin-bottom: 10px;
}
.profile .gender {
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: bold;
  color: black;
}
.profile .file {
  font-size: 16px;
  color: #696969;
}

.edit-box {
  /* height: 25px; */
  padding: 5px 10px;
  border: 1.4px solid #1e90ff;
  position: absolute;
  right: 10px;
  bottom: 20px;
  font-size: 14px;
  /* line-height: 25px; */
  color: #1e90ff;
}
.edit-box:hover {
  cursor: pointer;
}

.main-btm-box {
  margin-top: 20px;
  height: 100%;
  box-sizing: border-box;
  background-color: #fff;
}
.main-btm-r {
  width: 65%;
  float: left;
  padding-left: 20px;
  box-sizing: border-box;
}
.tabs {
  width: 100%;
  height: 40px;
}
.tabs .tabs-item {
  width: 100%;
  height: 400px;
}
.tabs .tabs-item .content {
  width: 100%;
  height: 400px;
  line-height: 400px;
}
.main-btm-l {
  float: right;
  width: 30%;
  height: 100%;
  background-color: #f5f5f5;
  padding-left: 10px;
}

.main-btm-l .content {
  width: 100%;
  height: 70%;
  background-color: #fff;
  padding: 6px;
  box-sizing: border-box;
}

.main-btm-l .content .header {
  display: flex;
  justify-content: left;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  height: 50px;
}
.main-btm-l .content .header img {
  width: 100px;
  height: 50px;
  object-fit: cover;
}
.main-btm-l .content .center {
  width: 100%;
  height: 160px;
  background: rgba(133, 144, 166, 0.05);
  margin-top: 30px;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-btm-l .content .center h5 {
  white-space: nowrap;
}
.main-btm-l .content .center .txt-box {
  width: 60%;
}
.main-btm-l .content .center .txt-box img {
  width: 30;
  height: 100px;
}
.main-btm-l .content .center .txt-box .txt-cc {
  font-size: 14px;
  margin-top: 8px;
  text-align: left;
}

.main-btm-l .content .btm {
  width: 100%;
  height: 50px;
  border: 1px solid #1e90ff;
  color: #1e90ff;
  line-height: 50px;
  margin-top: 40px;
}
.main-btm-l .lowest-level {
  height: 30%;
  width: 100%;
  background-color: #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lowest-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  width: 50%;
  height: 90%;
}
.lowest-item:nth-child(2) {
  border-left: 1px solid #ccc;
}
.lowest-item div:nth-child(2) {
  margin-top: 4px;
  font-weight: bold;
}
</style>